/*****************************************************************************
 * $LastChangedDate: 2010-01-24 20:49:54 -0500 (Sun, 24 Jan 2010) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Planet class is a Facade over a flat or spherical world.
 *//*
 * LEGAL:   COPYRIGHT (C) 2008 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#define WORLD_PLANET_CC 1
#define NEED_PLANET_CLASS 1
#include "base/module.hh"
#include "base/conf.hh"
using namespace base;
#include "world/module.hh"
#include "world/conf.hh"
#include "world/planet.hh"
#include "world/planet_flat.hh"
#if COMPILE_OSSIM
#include "world/planet_ossim.hh"
#endif

namespace world {

////////////////////////////////////////////////////////////////////////////////
////////////////////////////////  Planet  //////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

Planet* Planet::msInstance;

/*****************************************************************************
 * Singleton method.
 *****************************************************************************/
Planet*
Planet::CreateInstance( void )
{
#if COMPILE_OSSIM
    if ( WORLD_CONF.mFlatWorld )
        return new FlatPlanet;
    else
        return new OssimPlanet;
#else
    return new FlatPlanet;
#endif
}

} // namespace world
